package com.xin.controller;

import com.xin.constants.CommonResult;
import com.xin.service.MenuService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@Api(tags = "菜单管理")
@RequestMapping("/menu")
public class MenuController {

    @Resource
    private MenuService menuService;

    @ApiOperation("查看员工拥有的菜单列表")
    @GetMapping("/findEmployeeHasMenu")
    public CommonResult<?> findEmployeeHasMenu(Long employeeId){
        return CommonResult.success(this.menuService.queryListParentId(employeeId),"请求成功");
    }

}
